package com.apiit.webserviceclient.activities;

import com.apiit.webserviceclient.R;
import com.apiit.webserviceclient.R.layout;
import com.apiit.webserviceclient.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class ViewPPF extends Activity implements OnClickListener {
	
	TextView title;
	TextView systemType;
	TextView developedFor;
	TextView requiredFor;
	TextView challenges;
	TextView newIdeas;

	Button back;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_view_ppf);

		back = (Button) findViewById(R.id.btnppfBack);
		title = (TextView) findViewById(R.id.editPpfTitle);
		systemType = (TextView) findViewById(R.id.editPpfSystemType);
		developedFor = (TextView) findViewById(R.id.editPpfDevelopedFor);
		requiredFor = (TextView) findViewById(R.id.editPpfRequiredFor);
		challenges = (TextView) findViewById(R.id.editPpfMainChallenge);
		newIdeas = (TextView) findViewById(R.id.editPpfnewTheories);
		
		
		Intent intename = getIntent();
		String proTitle = intename.getStringExtra("proTitle");
		String proSystemType = intename.getStringExtra("systemType");
		String proDevelopedFor = intename.getStringExtra("developedFor");
		String proRequiredFor = intename.getStringExtra("requiredFor");
		String proChallenges = intename.getStringExtra("challenges");
		String proNewIdeas = intename.getStringExtra("newIdeas");
		
		title.setText(proTitle);
		systemType.setText(proSystemType);
		developedFor.setText(proDevelopedFor);
		requiredFor.setText(proRequiredFor);
		challenges.setText(proChallenges);
		newIdeas.setText(proNewIdeas);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.view_p, menu);
		return true;
	}

	public void onClick(View v) {
		// TODO Auto-generated method stub
		if (v == back) {
			Intent i = new Intent(this, Pagol.class);
			startActivity(i);
		}
	}

}
